perm filename TRYIT[DEN,LMM] blob sn#036309 filedate 1973-04-18 generic text, type T, neo UTF8
(GCGAG T)
(DE PUSH(X)(SETQ STACK(CONS X STACK)))))
(DF POP(X)(PROG1(SET(CAR X)(CAR 
(OR# STACK (HELP @EMPTY-STACK))))(SETQ STACK(CDR STACK]
(SETQ *NOPOINT T)
(SETQ %PRINTFN @PRIN1)
(SETQ *NOPOINT T)
  (SPECIAL @(STACK RA))
  (DE FINDNDS (RA RI)
      (PROG (X1)
       (COND (PATSELECT (SETQ RI T)))
     F (FOR NEW I := (1 NMX)
           DO (SETND I (QUOTE (0 . 0))))
       (COND ((SETQ X1 (ASSOC2 (CAAAR LINE) PATSELECT))
                 (SETND (CAR X1) (CONS (CADR X1) (CADDR X1))))
	     (T (SETND (CAAAR LINE) (QUOTE (15 . 15)))))
       (SETQ STACK (LIST 0 LINE))
       (COND ((FINDNDS1 RA RI T) (RETURN NIL)))
       (COND (PATSELECT (SETQ RI (SETQ PATSELECT NIL)) (SETQ RA 1))
	     ((LESSP 3 (SETQ RA (ADD1 RA))) (SETQ RI T)))
       (GO F)))

  (DE SETND (X Y)
      (PROG NIL (STORE (NODE X) (CAR Y))
                (STORE (NODE (PLUS X 20)) (CDR Y))
                (RETURN Y)))

  (DE FINDNDS1 (RA RI X3)
      (PROG (X1 X2 USED)
     C (COND ((ZEROP (NODE (SETQ X2 (CDAR (SETQ X1 (CAR LINE))))))
	      (COND (X3 (STKNDS X2 USED))))
	     ((RTLIN RI X1 USED) (PUSH3 USED LINE NIL)
			         (GO NXT)))
     A (COND ((ATOM (POP X3)) (GO D)))
       (SETND (CADR X3) (CAR X3))
       (COND ((RTLIN RI X1 USED) (PUSH USED) (PUSH LINE) (PUSH NIL))
	     (T (SETND (CADR X3) (QUOTE (0 . 0))) (GO A)))
    NXT(SETQ USED (CONS X1 USED))
       (SETQ X3 T)
       (COND ((SETQ LINE (CDR LINE)) (GO C))
	     (T (RETURN T)))
     D (POP LINE)
       (POP USED)
       (COND ((NULL STACK) (RETURN NIL))
	     (X3 (SETND X3 (QUOTE (0 . 0)))))
       (COND ((ATOM (CAR STACK)) (POP X3) (GO D)))
       (STORE (NODE (CADAR STACK)) 0)
       (SETQ X3 NIL)
       (GO C)))